package com.three.box.helper

import android.util.Log

object LogUtils {
    // 设置为false则可以使得Log不输出
    private var enable = true
    fun isEnable(enable: Boolean) {
        LogUtils.enable = enable
    }

    fun v(tag: String, msg: String) {
        if (enable) Log.d("" + tag, "" + msg)
    }

    fun d(tag: String, msg: String) {
        if (enable) Log.d("" + tag, "" + msg)
    }

    fun i(tag: String, msg: String) {
        if (enable) Log.i("" + tag, "" + msg)
    }

    fun w(tag: String, msg: String) {
        if (enable) Log.w("" + tag, "" + msg)
    }

    fun e(tag: String, msg: String) {
        if (enable) Log.e("" + tag, "" + msg)
    }
}